package easy

func Fib(n int) int {
	if n < 2 {
		return n
	}
	p, q := 0, 0
	r := 1
	for i := 2; i <= n; i++ {
		p = q
		q = r
		r = p + q
	}
	return r
}
